package com.example.walletdemo.controller;

import com.example.walletdemo.common.utils.ResponseResult;
import com.example.walletdemo.service.UserWalletService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: 包
 * @Date: 2023/2/20 22:59
 * Description:
 */
@RestController
@RequestMapping("/userwaller")
public class UserWalletController{

    @Autowired
    private UserWalletService userWalletService;

    @PostMapping("/balance")
    public ResponseResult getBalance(@RequestParam("walletId") Long walletId,@RequestParam("userId") Long userId) {
        return userWalletService.getBalance(walletId, userId);
    }
}
